Skip to content

Defer package summaries until cleanup - #23552

Merged
MikeMcQuaid merged 1 commit into
ordered-upgrade-phasesfrom
consistent-install-flow
Aug 19, 2026
Merged

Defer package summaries until cleanup#23552
MikeMcQuaid merged 1 commit into
ordered-upgrade-phasesfrom
consistent-install-flow

Conversation

@MikeMcQuaid

@MikeMcQuaid MikeMcQuaid commented Aug 17, 2026

Copy link
Copy Markdown
Member
  • collect formula and cask caveats without inline output
  • share cleanup and message finalisation across commands
  • print one caveat summary before the final upgrade result

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

OpenAI Codex 5.6 GPT Sol xhigh with local review and testing.


@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your pull request. This has been closed because it appears to be missing the pull request template, perhaps because this was written by an AI not a human. We require humans to read and fill in these templates.

Please edit this pull request to fill in the current pull request template. This workflow will reopen this pull request automatically once the template is complete. Do not open a new pull request for this.

@github-actions github-actions Bot closed this Aug 17, 2026
@MikeMcQuaid MikeMcQuaid reopened this Aug 17, 2026
@MikeMcQuaid
MikeMcQuaid requested a lite review from Copilot August 17, 2026 16:26
@MikeMcQuaid
MikeMcQuaid marked this pull request as ready for review August 17, 2026 16:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures brew install/reinstall/upgrade end-of-run output so formula/cask caveats are collected during installation and displayed once after cleanup, including before the final upgrade summary.

Changes:

  • Add Homebrew::Install.finish_installation to centralize install cleanup + message finalization across commands.
  • Stop printing formula/cask caveats inline during installation; record them for deferred display via Homebrew.messages.
  • Update command specs to assert the new cleanup → caveats/message ordering and new display_messages parameters.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Library/Homebrew/install.rb Adds finish_installation helper to run cleanup and display deferred messages/caveats.
Library/Homebrew/formula_installer.rb Switches formula caveats handling from inline printing to recording for deferred display.
Library/Homebrew/cask/installer.rb Stops inline caveats printing during cask install by no longer printing the returned caveats string.
Library/Homebrew/cask/upgrade.rb Stops inline caveats printing during cask upgrade by no longer printing the returned caveats string.
Library/Homebrew/cmd/install.rb Uses Install.finish_installation instead of inlining cleanup/message display.
Library/Homebrew/cmd/reinstall.rb Uses Install.finish_installation and removes now-redundant requires.
Library/Homebrew/cmd/upgrade.rb Uses Install.finish_installation so caveats/messages print before the final upgrade summary.
Library/Homebrew/test/install_spec.rb Adds coverage for finish_installation ordering (cleanup before message display).
Library/Homebrew/test/formula_installer_spec.rb Adds coverage ensuring formula caveats are recorded without inline stdout output.
Library/Homebrew/test/cask/installer_spec.rb Updates expectation to record cask caveats without inline stdout output.
Library/Homebrew/test/cmd/install_spec.rb Updates command expectations for deferred caveats display via force_caveats.
Library/Homebrew/test/cmd/reinstall_spec.rb Updates command expectations for deferred caveats display via force_caveats.
Library/Homebrew/test/cmd/upgrade_spec.rb Updates command expectations for deferred caveats display via force_caveats.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Library/Homebrew/cask/installer.rb Outdated
Comment thread Library/Homebrew/cask/upgrade.rb Outdated
Comment thread Library/Homebrew/test/install_spec.rb Outdated
@MikeMcQuaid
MikeMcQuaid force-pushed the consistent-install-flow branch from 227d58b to 2c37773 Compare August 17, 2026 19:24
@MikeMcQuaid
MikeMcQuaid force-pushed the consistent-install-flow branch 2 times, most recently from 8fe7695 to 9149c17 Compare August 18, 2026 10:23
@MikeMcQuaid
MikeMcQuaid force-pushed the consistent-install-flow branch from 9149c17 to 08bd988 Compare August 18, 2026 16:31
- collect formula and cask caveats without inline output
- share cleanup and message finalisation across commands
- print one caveat summary before the final upgrade result
@MikeMcQuaid
MikeMcQuaid force-pushed the consistent-install-flow branch from 08bd988 to dc0ed6d Compare August 18, 2026 18:23
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit 8c565a4 Aug 19, 2026
63 of 75 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the consistent-install-flow branch August 19, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants